package com.hmy.equipment.service.impl;

import com.hmy.equipment.domain.HmyScrape;
import com.hmy.equipment.mapper.HmyScrapeMapper;
import com.hmy.equipment.service.HmyScrapeService;
import org.apache.commons.math3.analysis.function.Abs;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ：kdq
 * @description：刮粪机
 * @date ：2024/1/30 18:33
 */
@Service
public class HmyScrapeServiceImpl implements HmyScrapeService {
    private static final Logger log = LoggerFactory.getLogger(HmyScrapeServiceImpl.class);

    @Resource
    private HmyScrapeMapper hmyScrapeMapper;

    /**
    *  * @param null
    * @return
    * @author kdq
    * @date 2024/1/30 18:33
    * @description 刮粪机设备添加
    */
    @Override
    public int addScrape(HmyScrape hmyScrape) {
        return hmyScrapeMapper.addScrape(hmyScrape);
    }


    /**
    *  * @param null
    * @return
    * @author kdq
    * @date 2024/1/30 18:34
    * @description 刮粪机设备修改
    */
    @Override
    public int editScrape(HmyScrape hmyScrape) {
        return hmyScrapeMapper.editScrape(hmyScrape);
    }


    /**
    *  * @param null
    * @return
    * @author kdq
    * @date 2024/1/30 22:50
    * @description 查询所有刮粪机设备
    */
    @Override
    public List<HmyScrape> selectAll(String scrapeCode,
                                     String scrapeName,
                                     String phouseCode) {
        return hmyScrapeMapper.selectAll(scrapeCode,scrapeName,phouseCode);
    }


    /**
    *  * @param null
    * @return
    * @author kdq
    * @date 2024/1/30 22:50
    * @description 根据id删除单个记录
    */
    @Override
    public int deleteById(Long[] ids) {
        return hmyScrapeMapper.deleteById(ids);
    }


    /**
    *  * @param null
    * @return
    * @author kdq
    * @date 2024/2/2 18:21
    * @description 根据id查询自动刮粪机
    */
    @Override
    public HmyScrape selectById(Long id) {
        return hmyScrapeMapper.selectById(id);
    }



    /**
    *  * @param null
    * @return
    * @author kdq
    * @date 2024/2/2 18:22
    * @description 根据scrapeCode查询自动刮粪机
    */
    @Override
    public HmyScrape findscrapeCode(String scrapeCode) {
        return hmyScrapeMapper.findscrapeCode(scrapeCode);
    }
}
